package com.study.consumer.listener;

import com.rabbitmq.client.Channel;
import com.study.consumer.bindler.EchoBinding;
import org.springframework.amqp.support.AmqpHeaders;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.messaging.handler.annotation.Header;

import java.io.IOException;

/**
 * @author Mayjean
 * @Date2020/8/15 22:32
 */
@EnableBinding(EchoBinding.class)
public class HelloListener {

    @StreamListener(target = EchoBinding.GREETING)
    public void processChannelGreeting(String msg) throws IOException {
        System.out.println("RECV:"+msg);

    }
}
